import socket

target_host = "127.0.0.1"
target_port = 8888

s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((target_host,target_port))

print(s.recv(1024).decode('utf-8'))

for data in [b'bob',b'mike',b'john']:
    s.send(data)
    print(s.recv(1024).decode('utf-8'))

s.send(b'exit')
s.close()

